var pageii = null;
var grid = null;
$(function() {
	grid = lyGrid({
		pagId : 'paging',
		l_column : [{
			colkey : "date",
			name : "日期",
			renderData : function(rowindex,data, rowdata, column) {
				if(data!=''){
					return new Date(data).format("yyyy-MM-dd");
				}else{
					return "";
				}
			}
		}, {
			colkey : "specification",
			name : "规格型号"
		}, {
			colkey : "judgePeople",
			name : "评审参与人员"
		}, {
			colkey : "size",
			name : "产品大小"
		}, {
			colkey : "mouldNo",
			name : "模具型号"
		}, {
			colkey : "perCount",
			name : "一模件数"
		}, {
			colkey : "difficult",
			name : "成型难度"
		}, {
			colkey : "defect",
			name : "产品有否缺陷"
		}, {
			colkey : "edge",
			name : "有无批锋"
		}, {
			colkey : "life",
			name : "模具寿命"
		}, {
			colkey : "reasonability",
			name : "设计合理性"
		}, {
			colkey : "structure",
			name : "结构"
		}, {
			colkey : "materialMobility",
			name : "入料流动性"
		}, {
			colkey : "craftJudge",
			name : "工艺综合评价"
		}, {
			colkey : "mandrilPosition",
			name : "顶杆有否合理位置"
		}, {
			colkey : "materialGunPosition",
			name : "料枪有否合理位置"
		}, {
			colkey : "demouldDifficulty",
			name : "脱模难度描述"
		}],
		jsonUrl : rootPath + '/developJudge/developJudge_findByPage.shtml',
		dymCol:true,
		checkbox : true,
		serNumber : false
	});
	$("#editFun").click("click", function() {
		editAccount();
	});
	$("#search").click("click", function() {
		var searchParams = $("#searchForm").serializeJson();
		grid.setOptions({
			data : searchParams
		});
	});
});
function editAccount() {
	var cbox = grid.getSelectedCheckbox();
	if (cbox.length > 1 || cbox == "") {
		layer.msg("只能选中一个");
		return;
	}
	pageii = layer.open({
		title : "编辑模具开发/变更评审表",
		type : 2,
		area : [ "800px", "100%" ],
		content : rootPath + '/developJudge/developJudge_edit.shtml?id=' + cbox
	});
}




